<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no" />
		<title>速翔网络 - QQ技术：1424445608</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
		<style>
 			body{
 				background: #fff !important;
 			}
 			.sx-footer,.sx-footer2{
 				background: #fff;
 			}
 			.sx-footer{
 				padding-left: 1rem;
 				padding-right: 1rem;
 				border-top: 1px solid #e8e8e8;
 			}
			.sx-footer div img{
				width: 2.3rem;
				height: 2.3rem;
				margin: 0 auto;
			}
			.sx-footer div p{
				font-size: 0.65rem;
				text-align: center;
				padding-top:0.3rem;
			}
			.sx-footer2{
				text-align: center;
			}
			.sx-footer2 div{
				width: 50%;
				color: #000;
			}

			.sx-main{

			}
			.sx-li{
				overflow: hidden;
				margin-bottom: 0.75rem;
				background: #fff;
			}
			.sx-h2{
				padding: 0.35rem 0.75rem;
				border-bottom: 1px solid #e8e8e8;
				display: flex;
			}
			.sx-h2 span:nth-child(1){
				border-left:0.2rem solid #D43D3D;
				padding-left:0.5rem;
				color: #333;
			}
			.sx-h2 span:nth-child(2){
				font-size: 0.6rem;
				color: #9B9B9B
			}
			.sx-p{
				border-bottom: 1px solid #e8e8e8;
				padding-top: 0.55rem;
			}
			.sx-p img{
				width: 88%;
				margin: 0 auto;
				height: 8.8rem;
			}
			.sx-p p{
				width: 70%;
				margin: 0 auto;
				font-weight: bold;
			}
			.sx-border{
				border-right: 1px solid #e8e8e8;
			}
			.sx-g{
				text-align: center;
				padding: 0.25rem;
				background: #EEEEEE;
				border-radius: 0.8rem;
				width: 40%;
				margin: 0.5rem auto;
				color: #5B5B5B;
				font-size: 0.6rem;
			}
			.aui-ellipsis-2 {
				-webkit-line-clamp: 1;
				font-size: 0.75rem;
				padding: 0 0.75rem;
				padding-top: 0.35rem;
			}
			.sx-text .sx-p{
				height: 12.8rem;
				text-align: center;
			}
		</style>
	</head>
	<body>
		<div class="aui-card-list-footer sx-footer2 aui-padded-l-15 aui-padded-r-15" style="padding: 1rem;">
			<div class="aui-border-r">
				LDT：<b id="money">0.00</b> LDT
			</div>
			<div>
				金币：<b id="jinbi">0</b> 个
			</div>
		</div>
		<div class="aui-card-list-footer sx-footer aui-margin-b-15">
			<div Tapmode onclick="_url({url:'yaoqing/mallList',id:0,title:'全部商品'},'',true)">
				<img src="../../image/yaoqing/mall_1.jpg" />
				<p>全部商品</p>
			</div>
			<div Tapmode onclick="_url({url:'yaoqing/mallList',id:2,title:'流量话费'},'',true)">
				<img src="../../image/yaoqing/mall_4.jpg" />
				<p>流量话费</p>
			</div>
			<div Tapmode onclick="_url({},'member/tixian',true)">
				<img src="../../image/yaoqing/mall_3.jpg" />
				<p>我要提现</p>
			</div>
			<div tapmode onclick="_url({url:'yaoqing/mallOrder',title:'兑换记录'},'',true)">
				<img src="../../image/yaoqing/mall_2.jpg" />
				<p>兑换记录</p>
			</div>
		</div>
		<div class="sx-main">
		 	<script id="fx-list" type="text/x-dot-template">
				{{ for(var i=0,len=it.length; i < len; i++) { }}
				<div class="sx-li">
					<div class="sx-h2 aui-card-list-footer">
						<span>{{= it[i].title}}</span>
						<span Tapmode onclick="_url({url:'yaoqing/mallList',id:{{= it[i].id}},title:'{{= it[i].title}}'},'',true)">更多></span>
					</div>
					<div class="sx-text aui-row">
						{{ for(var is=0,lens=it[i].data.length; is < lens; is++) { }}
						<div class="sx-p aui-col-xs-6 sx-border" Tapmode onclick="_url({url:'yaoqing/mallView',id:{{= it[i].data[is].id}},title:'商品详细'},'',true)">
							<img  id="ffxiangImgCache" ffxiang-src="{{= it[i].data[is].image}}" src="../../image/loadingImage.png" />
							<span class="aui-ellipsis-2">{{= it[i].data[is].title}}</span>
							<p class="aui-card-list-footer"><span>{{= it[i].data[is].jinbi}}</span><span>{{= it[i].data[is].money}}</span></p>
						</div>
						{{ } }}
					</div>
					<div class="sx-g" Tapmode onclick="_url({url:'yaoqing/mallList',id:{{= it[i].id}},title:'{{= it[i].title}}'},'',true)">更多{{= it[i].title}}</div>
				</div>
				{{ } }}
			</script>
			<div class="sx-ul" id="fx-view"><div id="jiazai"><img src="../../image/loading_more.gif" /></div></div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/zepto.min.js"></script>
	<script type="text/javascript" src="../../script/doT.js"></script>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/ffxiang.js"></script>
	<script type="text/javascript">
		apiready = function() {

			user()
			// 回到屏幕
			api.addEventListener({
				name : 'viewappear'
			}, function(ret, err) {
				user()
			});
			shoplist()
		}
		function shoplist(){
			_ajax('api/yaoqing/mall',function(ret,err){
				console.log(JSON.stringify(ret)+JSON.stringify(err))
				if(ret){
					var evalData = doT.template($api.html($api.byId('fx-list')));
					$api.html($api.byId('fx-view'), evalData(ret));
					_imageCache();
					api.parseTapmode();
				}
			})
		}
		function user(){

			_user = $api.getStorage('user')
			console.log(JSON.stringify(_user))
			$('#jinbi').text(_user.yaoqing.jinbi);
			$('#money').text((_user.yaoqing.money/100).toFixed(2));
		}

	</script>
</html>
